package jobascjp;

public class Bridge {
    
    public enum Suits { 
        CLUBS(200), DIAMONDS(20), HEARTS(30), SPADES(30), NOTRUMP(40) { public int getValue(int bid){ return (( bid - 1) * 30) + 40; } };
        Suits( int points ){ this.points = points; }
        private int points;
        public int getValue( int bid ){ return points * bid; }
    }
    public static void main(String[] args) {
        System.out.println( Suits.NOTRUMP.getValue(3)); // Original: System.out.println( Suits.NOTRUMP.getBidValue(3));
        System.out.println( Suits.SPADES + " " + Suits.SPADES.points);
        System.out.println( Suits.values()); // liefert den Zeiger nicht die Inhalte!
        
        /*
         * Which is true?
         * The output could contain 30 // ja 
         * The output could contain @bf73fa // ja
         * The output could contain DIAMONDS
         * Compilation fails due to an error on line 6;
         * Compilation fails due to an error on line 7;
         * Compilation fails due to an error on line 8;
         * Compilation fails due to an error on line 9;
         * Compilation fails due to an error on line 12-14;
         * 
         * 
         * Anmerkungen:
         * values() liefert den Zeiger aufs Array, nicht etwa das Enum.
         * 
         */
    }
}
